﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IList<Prodma.DataAccess.Models.ViewModels.ContentVm>>" %>

<div class="listTitleContainer">
    <div class="listTitleCenter-50">#</div>
    <div class="listTitleLeft-200">Ad</div>
    <div class="listTitleCenter-150">Kategori</div>
    <div class="listTitleCenter-50">ID</div>
</div>

<div class="listRowContainer">
    
<% int counter = 1; %>
    
<% foreach (Prodma.DataAccess.Models.ViewModels.ContentVm content in ViewData.Model) %>
<% { %>
     <% if (counter % 2 != 0) %>
     <% { %>
         <div class="listRow1">
            <div class="listColumnCenter-50"><%=counter%></div>
            <div class="listColumnLeft-200">
                <a href='/content/edit/?id=<%=content.Id %>&page=<%=Request.QueryString["page"]%>' class="listSelectItemBold">
                    <%=content.Name%>
                </a>
            </div>
            <div class="listColumnCenter-150"><%=content.Category.Name%></div>
            <div class="listColumnCenter-50"><%=content.Id%></div>
         </div>
     <% } %>
     <% else %>
     <% { %>
          <div class="listRow2">
            <div class="listColumnCenter-50"><%=counter %></div>
            <div class="listColumnLeft-200">
                <a href='/content/edit/?id=<%=content.Id %>&page=<%=Request.QueryString["page"]%>' class="listSelectItemBold">
                    <%=content.Name%>
                </a>
            </div>
            <div class="listColumnCenter-150"><%=content.Category.Name %></div>
            <div class="listColumnCenter-50"><%=content.Id %></div>
         </div>
     <% } %>
     <% counter++; %>
<% } %>

</div>